<!DOCTYPE html>
<html>
  <head><meta name="generator" content="Hexo 3.8.0">
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
  <meta name="description" content="fengzhaoyang&#39;s blog">
  <meta name="keyword" content="hexo-theme, vuejs">
  
  <link rel="shortcut icon" href="/css/images/logo.png">
  
  <title>
    
    fzy-blog
    
  </title>
  <link href="//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.css" rel="stylesheet">
  <link href="//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/tomorrow.min.css" rel="stylesheet">
  <link rel="stylesheet" href="/css/style.css">
  
  <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/geopattern/1.2.3/js/geopattern.min.js"></script>
  <script src="//cdnjs.cloudflare.com/ajax/libs/nprogress/0.2.0/nprogress.min.js"></script>
  
  <script src="/js/qrious.js"></script>
  
  
  
  
    <!-- MathJax support START -->
    <script type="text/x-mathjax-config">
      MathJax.Hub.Config({
        tex2jax: {
          inlineMath: [ ['$','$'], ["\\(","\\)"]  ],
          processEscapes: true,
          skipTags: ['script', 'noscript', 'style', 'textarea', 'pre', 'code']
        }
      });
    </script>

    <script type="text/x-mathjax-config">
      MathJax.Hub.Queue(function() {
        var all = MathJax.Hub.getAllJax(), i;
        for (i=0; i < all.length; i += 1) {
          all[i].SourceElement().parentNode.className += ' has-jax';
        }
      });
    </script>
    <script type="text/javascript" src="//cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
    <!-- MathJax support END -->
  


</head>
<div class="wechat-share">
  <img src="/css/images/logo.png">
</div>
  <body>
    <header class="header fixed-header">
  <div class="header-container">
    <a class="home-link" href="/">
      <div class="logo"></div>
      <span>fzy-blog</span>
    </a>
    <ul class="right-list">
      
        <li class="list-item">
          
            <a href="/" class="item-link active">Home</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/tags/" class="item-link">Tags</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/archives/" class="item-link">Archives</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/project/" class="item-link">Projects</a>
          
        </li>
      
        <li class="list-item">
          
            <a href="/about/" class="item-link">About</a>
          
        </li>
      
    </ul>
    <div class="menu">
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
      <span class="icon-bar"></span>
    </div>
    <div class="menu-mask">
      <ul class="menu-list">
        
          <li class="menu-item">
            
              <a href="/" class="menu-link mobile-active">Home</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/tags/" class="menu-link">Tags</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/archives/" class="menu-link">Archives</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/project/" class="menu-link">Projects</a>
            
          </li>
        
          <li class="menu-item">
            
              <a href="/about/" class="menu-link">About</a>
            
          </li>
        
      </ul>
    </div>
  </div>
</header>

    <main class="app-body">
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/ThreadPoolExecutor使用和思考（上）-线程池大小设置与BlockingQueue的三种实现区别/">ThreadPoolExecutor使用和思考（上）-线程池大小设置与BlockingQueue的三种实现区别</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      前记：jdk 官方文档（javadoc）是学习的最好，最权威的参考。文章分上中下。上篇中主要介绍 ThreadPoolExecutor 接受任务相关的两方面入参的意义和区别，池大小参数 corePoolSize 和 maximumPoolSize，BlockingQueue 选型（Synch ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/ThreadPoolExecutor使用和思考（上）-线程池大小设置与BlockingQueue的三种实现区别/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/java并发处理规范/">java 并发处理 规范</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      java 并发处理 规范(九) 并发处理Rule 1. 【强制】创建线程或线程池时请指定有意义的线程名称，方便出错时回溯
1）创建单条线程时直接指定线程名称
12Thread t = new Thread();t.setName("cleanup-thread");
2） 线程池则使用 gu ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/java并发处理规范/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/javajdkconcurrent并发工具包/">java jdk concurrent 并发工具包</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      java jdk concurrent 并发工具包java.util.concurrent 并发工具包http://blog.csdn.net/defonds/article/details/44021605
通俗易懂，JDK 并发容器总结https://juejin.im/post/5c0 ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/javajdkconcurrent并发工具包/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/java并发线程池拒绝策略/">java 并发线程池 拒绝策略</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      java 并发线程池 拒绝策略http://blog.sina.com.cn/s/blog_714cb3040102wc6i.html线程池参考：https://github.com/760515805/es_data_export/blob/master/src/main/java/com ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/java并发线程池拒绝策略/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/java异步计算场景应用/">java异步计算场景应用</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      最近项目中遇到一个业务场景：将当期数据库中的表迁移到另外一个数据库中，为满足迁移效率需要进行并发数据迁移。对每一数据表可以启动不同的线程同时迁移数据。迁移完成后，同步更新对应该迁移任务的状态字段。最先想到的是使用 java 中并发工具类：同步屏障 CyclicBarrier。CyclicBa ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/java异步计算场景应用/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/java线程池、包括线程的异常处理/">java线程池、包括线程的异常处理</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      对于线程池、包括线程的异常处理推荐一下方式:
1 直接 try/catch，个人 基本都是用这种方式
2 线程直接重写整个方法:
1234567891011121314     Thread t = new Thread();     t.setUncaughtExceptionHandle ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/java线程池、包括线程的异常处理/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/spring@Async异步任务/">spring @Async 异步任务</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      spring @Async 异步任务https://juejin.im/post/5b27b8366fb9a00e46675879
https://blog.csdn.net/v2sking/article/details/72795742
https://www.cnblogs.com/y ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/spring@Async异步任务/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/java高并发系统之异步非阻塞京东技术/">java 高并发系统之异步非阻塞 京东技术</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      java 高并发系统之异步非阻塞 京东技术http://wely.iteye.com/blog/2346288http://wely.iteye.com/blog/2346283http://wely.iteye.com/blog/2346153http://wely.iteye.com/b ...
      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/java高并发系统之异步非阻塞京东技术/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/开发工具/Cron表达式范例/">Cron 表达式范例</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#开发工具">
    <span class="tag-code">开发工具</span>
  </a>

    
    <div class="article-summary">
      
      Cron 表达式范例：
每隔 5 秒执行一次：_/5 _ * * * ?
每隔 1 分钟执行一次：0 _/1 _ * * ?
每天 23 点执行一次：0 0 23 * * ?
每天凌晨 1 点执行一次：0 0 1 * * ?
每月 1 号凌晨 1 点执行一次：0 0 1 1 * ?
每月最后 ...
      
    </div>
    <a class="more" href="/2019/05/24/开发工具/Cron表达式范例/">全文...</a>
  </article>
  
  <article class="article-card">
    <h2 class="article-head">
      <a href="/2019/05/24/多线程异步并发/队列+线程池实例/">队列+线程池实例</a>
    </h2>
    <p class="article-date">2019-05-24</p>
    
    
  <a href="/tags#多线程异步并发">
    <span class="tag-code">多线程异步并发</span>
  </a>

    
    <div class="article-summary">
      
      https://blog.52itstyle.com/archives/1385/

      
    </div>
    <a class="more" href="/2019/05/24/多线程异步并发/队列+线程池实例/">全文...</a>
  </article>
  

  
  <div class="guide-pager">
  
    <a href="/page/17/"><span class="page-arrow">← </span>Prev</a>
  
  
    <a href="/page/19/">Next<span class="page-arrow"> →</span></a>
  
</div>
  
</main>
    <div class="scroll-top">
  <span class="arrow-icon"></span>
</div>
    <footer class="app-footer">
  <p class="copyright">
    &copy; 2019
  </p>
</footer>

<script>
  function async (u, c) {
    var d = document,
      t = 'script',
      o = d.createElement(t),
      s = d.getElementsByTagName(t)[0];
    o.src = u;
    if (c) {
      o.addEventListener('load', function (e) {
        c(null, e);
      }, false);
    }
    s.parentNode.insertBefore(o, s);
  }
</script>
<script>
  async ("//cdnjs.cloudflare.com/ajax/libs/fastclick/1.0.6/fastclick.min.js", function () {
    FastClick.attach(document.body);
  })
</script>

<script>
  var hasLine = 'true';
  async ("//cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js", function () {
    $('figure pre').each(function (i, block) {
      var figure = $(this).parents('figure');
      if (hasLine === 'false') {
        figure.find('.gutter').hide();
      }
      var lang = figure.attr('class').split(' ')[1] || 'code';
      var codeHtml = $(this).html();
      var codeTag = document.createElement('code');
      codeTag.className = lang;
      codeTag.innerHTML = codeHtml;
      $(this).attr('class', '').empty().html(codeTag);
      figure.attr('data-lang', lang.toUpperCase());
      hljs.highlightBlock(block);
    });
  })
</script>
<!-- Baidu Tongji -->

<script src="/js/script.js"></script>
  </body>
</html>